通知服务API
配置通知地址
接口地址
POST /api/v1.0/invoke/open-ability/method/general-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| notice_url | String | Body | 是 | 通知地址 |
| custom | []Object<custom> | Body | 否 | 自定义信息 |
custom说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| notice_type | String | Body | 否 | 通知类型 family:家庭监听通知 account:账号监听通知 device:设备监听通知 space:空间监听通知 scene:场景监听通知 communication:沟通监听通知 maintenance:报修监听通知 booking:预约监听通知 general_device:通用设备监听通知 |
| notice_url | String | Body | 否 | 通知地址 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/general-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "configure_notice_url",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"notice_url": "https://demo.akubela.com"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回